   $(document).ready(function () {
        var date = [];
        var diagnosed = [];
        var suspected = [];
        var cured = [];
        var died = [];

        var option = {
        backgroundColor: '',
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            data: ['line', 'bar'],
            textStyle: {
                color: '#ccc'
            }
        },
        xAxis: {
            data: date,
            axisLine: {
                lineStyle: {
                    color: '#ccc'
                }
            }
        },
        yAxis: {
            splitLine: {show: false},
            axisLine: {
                lineStyle: {
                    color: '#ccc'
                }
            }
        },
        series: [{
            name: '确诊',
            type: 'line',
            smooth: true,
            showAllSymbol: true,
            symbol: 'emptyCircle',
            symbolSize: 15,
            data: []
        },
            {
            name: '治愈',
            type: 'pictorialBar',
            symbol: 'rect',
            itemStyle: {
                color: '#0f375f'
            },
            symbolRepeat: true,
            symbolSize: [12, 4],
            symbolMargin: 1,
            z: -10,
            data: []
        },
            {
            name: '疑似',
            type: 'bar',
            barGap: '-100%',
            barWidth: 10,
            itemStyle: {
                color: new echarts.graphic.LinearGradient(
                    0, 0, 0, 1,
                    [
                        {offset: 0, color: 'rgba(20,200,212,0.5)'},
                        {offset: 0.2, color: 'rgba(20,200,212,0.2)'},
                        {offset: 1, color: 'rgba(20,200,212,0)'}
                    ]
                )
            },
            z: -12,
            data: []
        },
        {
            name: '死亡',
            type: 'bar',
            barWidth: 10,
            itemStyle: {
                barBorderRadius: 5,
                color: new echarts.graphic.LinearGradient(
                    0, 0, 0, 1,
                    [
                        {offset: 0, color: '#14c8d4'},
                        {offset: 1, color: '#43eec6'}
                    ]
                )
            },
            data: []
        },]
    };
                    var mychat=echarts.init(document.getElementById('plot-1-tt'));
                    mychat.setOption(option)
                    mychat.showLoading()
        $.ajax({
            url: "/data_line_bar"
            , async: true
            , dataType: 'JSON'
            , timeout: 10000
            , contentType: "application/json"
            , success: function (data) {
                for (var i =data.length-1; i <=0; i--) {
                    date.push(data[i].date);
                    diagnosed.push(data[i].diagnosed);
                    suspected.push(data[i].suspected);
                    cured.push(data[i].cured);
                    died.push(data[i].died)
                }
                mychat.hideLoading();
                mychat.setOption({
                    xAxis:{data:date},
                    series: [{
                        data:diagnosed
                    },{
                        data:cured
                },{
                        data:suspected
                    },{
                        data:died
                    }]
                })
            }
        });
    });
    // option
